// pages/newPageBanfour/newPageBanfour.js
var app = getApp();
var com = require('../../common.js');
Page({
  data: {
    info:{}
  },
  onLoad: function (options) {
    var _this = this
    _this.onInfoPage()
  },
  onReady: function () { },
  onShow: function () { },
  onHide: function () { },
  onUnload: function () { },
  onPullDownRefresh: function () { },
  onReachBottom: function () { },
  onShareAppMessage: function () { },
  onInfoPage() {
    console.log(this.data)
    var _this = this
    com.link(app.link.sub, {}, function (res) {
      console.log(res)
      _this.setData({
        info: res.data.response,
      })
      console.log(_this.data.info)
    }, 'GET')
  },
  onJumpPage(e) {
    wx.showLoading({
      title: '提交中...',
    })
    var _this = this,
      id = e.currentTarget.id
    if (id == 1) {
      wx.reLaunch({
        url: '/pages/newPageBanthree/newPageBanthree',
      })
      return false
    }
    com.link(app.link.onOpenSub, {}, function (res) {
      console.log(res)
      wx.showToast({
        title: '提交成功',
        icon: 'success'
      })
      setTimeout(() => {
        wx.reLaunch({
          url: '/pages/newPageBankIndex/newPageBankIndex',
        })
      }, 1500)
    })

  },
  onShowSli() {
    wx.navigateTo({
      url: '/pages/newPageali/newPageali',
    })
  }
})